package com.project.poetry.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.project.poetry.service.entity.dto.forum.ForumListDTO;
import com.project.poetry.service.entity.dto.forum.ReleaseForumDTO;
import com.project.poetry.service.entity.po.forum.ForumPO;
import com.project.poetry.service.entity.po.user.UserPO;

import java.util.List;

/**
 * 论坛业务层接口
 * @author mengxj
 */
public interface ForumService extends IService<ForumPO> {

    /**
     * 发布论坛
     * @param releaseForum 内容
     * @param user 当前人
     */
    void releaseForum(ReleaseForumDTO releaseForum, UserPO user);

    /**
     * 论坛查询
     * @param userId userId
     * @return 查询结果
     */
    List<ForumListDTO> forumList(Long userId);

    /**
     * 删除帖子以及该帖子后面的评论记录
     * @param forumId 帖子id
     */
    void deleteById(Long forumId);
}
